using System;
using System.Collections.Generic;
using System.Text;

namespace GeneticAlgorithm.CP1
{
    class Population : Population<float[], float[]>
    {
        /// <summary>
        /// Populate the generation 0 with random individuals.
        /// </summary>
        /// <param name="size"></param>
        public Population(int size) : base(size, 0.25f)
        {
            //members = new List<Individual<float[], float[]>>();

            // populate list with generation 0
            for (int i = 0; i < maxSize; i++)
            {
                members.Add(new Individual(new float[] { Global.NextGene(), Global.NextGene() }));
            }
        }

        /// <summary>
        /// Remove the 10 least fit individuals from the population.
        /// </summary>
        //public override void Cull()
        //{
            //base.Cull();
            // sort population by fitness
            //members.RemoveRange(10, members.Count-10);
        //}


    }
}
